package test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-01-27
 * Time:21:06
 */
@Controller
public class Demo2 {
    @Autowired
    @Qualifier(value = "userDemo")
    private User user;
    @Bean(name = "userTest")
    public User user(){
        user.setId(4);
        return user;
    }
}
